﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DualPlaneFR4Paster.Migrations
{
    public partial class addFloorProperty : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<int>(
                name: "Floor",
                table: "XYZRPoints",
                type: "INTEGER",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "Floor",
                table: "MParams",
                type: "INTEGER",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.UpdateData(
                table: "MParams",
                keyColumn: "Id",
                keyValue: 1,
                columns: new[] { "Floor", "Unit" },
                values: new object[] { 1, "mm" });

            migrationBuilder.UpdateData(
                table: "XYZRPoints",
                keyColumn: "Id",
                keyValue: 1,
                column: "Floor",
                value: 1);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "Floor",
                table: "XYZRPoints");

            migrationBuilder.DropColumn(
                name: "Floor",
                table: "MParams");

            migrationBuilder.UpdateData(
                table: "MParams",
                keyColumn: "Id",
                keyValue: 1,
                column: "Unit",
                value: null);
        }
    }
}
